package clientWS;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.rmi.RemoteException;
import java.util.Vector;

import common.User;


import webserviceServer.WebServiceServerImplProxy;


public class ClientWSImpl {

	/**
	 * @param args
	 */
	private ByteArrayOutputStream baos;
	private ObjectOutputStream oos;
	private WebServiceServerImplProxy proxyServer;
	
	public ClientWSImpl(){
		
		try{
			
			
			
			
			proxyServer = new WebServiceServerImplProxy();
			
			Vector<String> vector=proxyServer.sayHello(null);
			
			System.out.println("resposta do servidor:"+vector.get(1));
			
		}
		catch(Exception e){
			
			e.printStackTrace();
		}
	}
	
	
	
	public static void main(String[] args) {
		
		
		Vector<String> ipPortsDHT = (Vector<String>) null;
		
		try{
		ipPortsDHT.get(0);
		
		}catch(Exception e){
			e.printStackTrace();
		}
		
		System.out.println("passou o try");
		
		
		
	//	new ClientWSImpl();
		
		
		

	}
	
	private byte[] createArrayBytes(Object o){
	
		try {
			
			baos = new ByteArrayOutputStream();
			
			oos.writeObject(o);
		
			byte[] workAsBytes = baos.toByteArray();
			
			return workAsBytes;
			
		
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		return null;
		
		
	}
	

}
